import React, { useState , useEffect} from 'react';

import { ThemeContext } from './createContext';

import Child from './child.jsx';

const View = (props)=>{
    const [themes,setThemes] = useState({
        foreground: '#000000',
        background: '#eeeeee',
    })
    return(
        <div className="m">
            <h3>hook context</h3>
            <ThemeContext.Provider value={themes}>
                <Child/>
            </ThemeContext.Provider>
        </div>
    )
}
export default View;
